#ifndef __EGGSCENE_SCENE_E__
#define __EGGSCENE_SCENE_E__
//#pragma once
#include "BiboFrame.h"
#include "CCBirdProduct.h"
class EggScene : public BiboFrame
{
public:
	static cocos2d::CCArray *birdSprites;
	static cocos2d::CCArray *productOfBird;
	static CCMySprite *redBag;
	float eggFallingSpeed;
	int officialEgg;
public:
	EggScene(void);
	~EggScene(void);
	virtual bool init();  
	static cocos2d::CCScene* scene();
	CREATE_FUNC(EggScene);

	void menuCloseCallback(CCObject* pSender);
	// there's no 'id' in cpp, so we recommend returning the class instance pointer
	
	virtual void updateShowingInitScreen(float dt);
	void keyboardInputControlProcess(float dt);
	void birdBehaviorsController(float dt);
	void giveBirthControl(float dt);
	void updateLifeTimeForBirds(float dt);
	void reArrangeBirdProduct();
	
	CCMySprite* isCacthCheckProcess();
	void tick1(float dt);
	void tick2(float dt);
    
protected:
	void redBagOverlapEggProcess();
	void generateABird(int idGa);
	void birdAngelGiveBirth(CCNode* sender);
	void addBirdAngel(CCNode* sender);
	void removeYourself(CCNode* sender);
	void moveEggToRedBag(CCNode *sender);
	void moveAllEggToRedBag(CCNode *sender);
	void removeALife();
	CCBirdProduct* isEggOutOfBottomLine();
	void stopGame(bool isReplay);
    virtual void ccTouchesBegan(cocos2d::CCSet* touches, cocos2d::CCEvent *event);
    virtual void ccTouchesMoved(cocos2d::CCSet* touches, cocos2d::CCEvent *event);
    virtual void ccTouchesEnded(cocos2d::CCSet * touches, cocos2d::CCEvent *event);
};

#endif // __EGGSCENE_SCENE_E__